package io.renren.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 课程
 * 
 * @author Mark
 * @email sunlightcs@gmail.com
 * @date 2021-10-14 18:01:05
 */
@Data
@TableName("jx_course")
public class JxCourseEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 主键
	 */
	@TableId
	private Long id;
	/**
	 * 课程名称
	 */
	@NotBlank(message="请填写课程名称", groups = {AddGroup.class, UpdateGroup.class})
	private String name;
	/**
	 * 课程分类
	 */
	@NotNull(message="请填写课程分类", groups = {AddGroup.class, UpdateGroup.class})
	private Long courseTypeId;
	/**
	 * 课程介绍
	 */
	@NotBlank(message="请填写课程介绍", groups = {AddGroup.class, UpdateGroup.class})
	private String courseDesc;
	/**
	 * 图片地址
	 */
	@NotBlank(message="请上传图片", groups = {AddGroup.class, UpdateGroup.class})
	private String imgUrl;
	/**
	 * 课程简介
	 */
	@NotBlank(message="请填写课程简介", groups = {AddGroup.class, UpdateGroup.class})
	private String courseIntroduction;
	/**
	 * 排序
	 */
	@NotNull(message="排序不能为空", groups = {AddGroup.class, UpdateGroup.class})
	private  Integer orderNum;

	/**
	 * 分类名称
	 */
	@TableField(exist=false)
	private  String typeName;

	@NotBlank(message="是否热门不能为空", groups = {AddGroup.class, UpdateGroup.class})
	private   String isHot;
}
